package com.jzo2o.api.customer;

import com.jzo2o.api.foundations.dto.response.ServeAggregationResDTO;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

/**
 * contextId 指定FeignClient实例的上下文id，如果不设置默认为类名，value指定微服务的名称，path:指定接口地址
 */
@FeignClient(contextId = "jzo2o-foundations",value = "jzo2o-foundations",path = "/foundations/inner/serve")
public interface ServeApi {
    /**
     * 查询服务详情
     */
    @ApiOperation(value = "根据ID查询服务详情")
    @GetMapping("/{id}")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "id", value = "服务项id", required = true, dataTypeClass = Long.class)
    })
    ServeAggregationResDTO findById(@PathVariable("id")Long id);
}
